<!-- 分销中心  -->
<template>
  <s-layout
    navbar="inner"
    class="index-wrap"
    title="分销中心"
    :bgStyle="bgStyle"
    :onShareAppMessage="obj2"
  >
    <!-- 分销商信息 -->
    <commission-info />
    <!-- 账户信息 -->
    <account-info />
    <!-- 菜单栏 -->
    <commission-menu />
    <!-- 分销记录 -->
    <commission-log />

    <!-- 权限弹窗 -->
    <commission-auth />
  </s-layout>
</template>

<script setup>
  import { reactive } from 'vue';
  import commissionInfo from './components/commission-info.vue';
  import accountInfo from './components/account-info.vue';
  import commissionLog from './components/commission-log.vue';
  import commissionMenu from './components/commission-menu.vue';
  import commissionAuth from './components/commission-auth.vue';
  import sheep from '@/sheep';
  const state = reactive({});

  import $share from '@/sheep/platform/share';

  const obj2 = ref({
    title: '佰易汇国学，传承千年文化之光！',
    desc: '分销推广描述',
    poster: { type: 'user' },
    page: '1',
    params: {},
    path: '',
    image: sheep.$url.static('微信图片_20240327013710.jpg'),
  });
  const obj3 = $share.getShareInfo(obj2.value);
  obj2.value.path = obj3.path;
  console.log('obj2.value', obj2.value);

  const bgStyle = {
    backgroundColor: '#d99c5f',
    backgroundImage: sheep.$url.static('bg1.webp'),
  };
</script>

<style lang="scss" scoped>
  :deep(.page-main) {
    background-size: 100% 100% !important;
  }
</style>
